package com.beijiteshop.shop.ui.detail

import com.beijiteshop.libcommon.network.RetrofitClient
import com.beijiteshop.shop.ui.detail.vm.ProductDetailVM
import com.beijiteshop.shop.ui.detail.repo.ProductDetailRepo
import com.beijiteshop.shop.ui.detail.repo.ProductDetailService
import org.koin.android.viewmodel.dsl.viewModel
import org.koin.dsl.module

/**
 * @Author LiaoZhongKai
 * @Date 2021/3/8 15:51
 * @Description
 */

val detailModule = module {


    single {
        get<RetrofitClient>().getService(ProductDetailService::class.java)
    }

    single {
        ProductDetailRepo(get())
    }

    viewModel { ProductDetailVM(get()) }
}